package cn.yanxiaohui.service.web.pattern.proxy.cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @Description cglib动态代理的代理类
 * @Author： yanxh<br>
 * @Date 2019/12/9 14:51<br>
 * @Version 1.0<br>
 */
public class TGP implements MethodInterceptor {

	@Override
	public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
		System.out.println("TGP开始优化游戏环境...");
		Object result = methodProxy.invokeSuper(o, objects);
		System.out.println("游戏已正常启动...");
		return result;
	}
}
